#include "stdafx.h"

int _tmain(int argc, _TCHAR* argv[])
{
	CRect32 rect1(1, 2, 3, 4);
	CRect32 rect2(CPointInt32(1, 2));
	CRect32 rect3(CSizeUInt32(3, 4));


	ArrayTmpl<int_32> arr;
	for(int_32 cnt = 0; cnt != 100; ++cnt)
		arr.Add(cnt);
	CSimpleFileStream file(L"poetry2.txt", StreamModeRead);
	//CBufferedInputStream bis(&file, 1024);
	CDataInputStream dis(&file);
	uint_16 ucs_tag = dis.ReadUInt16();
	switch(ucs_tag)
	{
	case 0xFFFE:
		dis.SetDataInputEndian(StreamEndianBig);
		break;
	case 0xFFEF:
		dis.SetDataInputEndian(StreamEndianSmall);
		break;
	default:
		dis.Seek(StreamSeekBegin, 0);
		break;
	}

	dis.Seek(StreamSeekCurr, 4);
	dis.Seek(StreamSeekCurr, -4);
	dis.Seek(StreamSeekCurr, 2);
	dis.Seek(StreamSeekCurr, -2);
	char_8 line[256];
	while(dis.ReadAviliable())
	{
		dis.ReadLine(line);
		printf("%s\n", line);
	}
	file.Close();
	system("pause");
	return 0;
}

